Patent Document 1 discloses a controller for a multi-phase rotating machine, which is configured as follows. In case either the first inverter or the second inverter suffers from short-circuiting, all the MOS (Metal-Oxide-Semiconductor) in the failed system are turned OFF to stop the failed system from driving the motor, and the MOS transistors in the system that is normally operating are controlled so as to cancel out the braking torque generated in the failed system or minimize the influence thereof on the driving of the motor.